---
name: "pg_autoctl show settings"
section: "1"
platform: "linux"
package: "pg-auto-failover-cli"
version: "2.2-2"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/pg_autoctl show settings"
---

# pg\_autoctl show settings(1)

pg\_autoctl show settings pg\_autoctl show settings - Print replication settings for a formation from the monitor

## NAME

pg\_autoctl show settings - pg\_autoctl show settings

pg\_autoctl show settings - Print replication settings for a formation from the monitor

## SYNOPSIS

This command allows to review all the replication settings of a given formation (defaults to *'default'* as usual):

```
usage: pg_autoctl show settings  [ --pgdata ] [ --json ] [ --formation ]
--pgdata      path to data directory
--monitor     pg_auto_failover Monitor Postgres URL
--json        output data in the JSON format
--formation   pg_auto_failover formation
```

## DESCRIPTION

See also *pg\_autoctl get formation settings* which is a synonym.

The output contains setting and values that apply at different contexts, as shown here with a formation of four nodes, where **node\_4** is not participating in the replication quorum and also not a candidate for failover:

```
$ pg_autoctl show settings
   Context |    Name |                   Setting | Value
 ----------+---------+---------------------------+-------------------------------------------------------------
 formation | default |      number_sync_standbys | 1
   primary |  node_1 | synchronous_standby_names | 'ANY 1 (pgautofailover_standby_3, pgautofailover_standby_2)'
      node |  node_1 |        replication quorum | true
      node |  node_2 |        replication quorum | true
      node |  node_3 |        replication quorum | true
      node |  node_4 |        replication quorum | false
      node |  node_1 |        candidate priority | 50
      node |  node_2 |        candidate priority | 50
      node |  node_3 |        candidate priority | 50
      node |  node_4 |        candidate priority | 0
```

Three replication settings context are listed:

- 1\.

  The *"formation"* context contains a single entry, the value of **number\_sync\_standbys** for the target formation.

- 2\.

  The *"primary"* context contains one entry per group of Postgres nodes in the formation, and shows the current value of the **synchronous\_standby\_names** Postgres setting as computed by the monitor. It should match what's currently set on the primary node unless while applying a change, as shown by the primary being in the APPLY\_SETTING state.

- 3\.

  The *"node"* context contains two entry per nodes, one line shows the replication quorum setting of nodes, and another line shows the candidate priority of nodes.

This command gives an overview of all the settings that apply to the current formation.

## OPTIONS

- **--pgdata**

  Location of the Postgres node being managed locally. Defaults to the environment variable **PGDATA**. Use **--monitor** to connect to a monitor from anywhere, rather than the monitor URI used by a local Postgres node managed with **pg\_autoctl**.

- **--monitor**

  Postgres URI used to connect to the monitor. Must use the **autoctl\_node** username and target the **pg\_auto\_failover** database name. It is possible to show the Postgres URI from the monitor node using the command *pg\_autoctl show uri*.

  Defaults to the value of the environment variable **PG\_AUTOCTL\_MONITOR**.

- **--formation**

  Show the current replication settings for the given formation. Defaults to the **default** formation.

- **--json**

  Output a JSON formatted data instead of a table formatted list.

## ENVIRONMENT

PGDATA

Postgres directory location. Can be used instead of the **--pgdata** option.

PG\_AUTOCTL\_MONITOR

Postgres URI to connect to the monitor node, can be used instead of the **--monitor** option.

XDG\_CONFIG\_HOME

The pg\_autoctl command stores its configuration files in the standard place XDG\_CONFIG\_HOME. See the *XDG Base Directory Specification*.

XDG\_DATA\_HOME

The pg\_autoctl command stores its internal states files in the standard place XDG\_DATA\_HOME, which defaults to **~/.local/share**. See the *XDG* *Base Directory Specification*.

## EXAMPLES

```
$ pg_autoctl show settings
     Context |    Name |                   Setting | Value
   ----------+---------+---------------------------+-------------------------------------------------------------
   formation | default |      number_sync_standbys | 1
     primary |   node1 | synchronous_standby_names | 'ANY 1 (pgautofailover_standby_2, pgautofailover_standby_3)'
        node |   node1 |        candidate priority | 50
        node |   node2 |        candidate priority | 50
        node |   node3 |        candidate priority | 50
        node |   node1 |        replication quorum | true
        node |   node2 |        replication quorum | true
        node |   node3 |        replication quorum | true
```

## AUTHOR

Microsoft

## COPYRIGHT

Copyright (c) Microsoft Corporation. All rights reserved.
